<!DOCTYPE html>
<html lang="zh-CN">





<head>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="https://img2.jimu98.cn/blog/20200729222712.png">
  <link rel="icon" type="image/png" href="https://img2.jimu98.cn/blog/20200729222712.png">
  <meta name="viewport"
        content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="description" content="你会的越多,你不会的越多,我是积木,互联网的一只小菜鸡">
  <meta name="author" content="积木">
  <meta name="keywords" content="积木,jimu98,java,后端,jimu">
  <title>积木 | 互联网的一只小菜鸡</title>

  <link  rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.4.1/css/bootstrap.min.css" />



<!-- 主题依赖的图标库，不要自行修改 -->

<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_yg9cfy8wd6.css">



<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_pjno9b9zyxs.css">


<link  rel="stylesheet" href="/css/main.css" />

<!-- 自定义样式保持在最底部 -->


  <script  src="/js/utils.js" ></script>
  <script data-ad-client="ca-pub-2806771379080352" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<meta name="generator" content="Hexo 4.2.1"></head>


<body>
  <header style="height: 100vh;">
    <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand"
       href="/">&nbsp;<strong>jimu98</strong>&nbsp;</a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/">
                <i class="iconfont icon-home-fill"></i>
                首页
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/archives/">
                <i class="iconfont icon-archive-fill"></i>
                归档
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/categories/">
                <i class="iconfont icon-category-fill"></i>
                分类
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/tags/">
                <i class="iconfont icon-tags-fill"></i>
                标签
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/list/">
                <i class="iconfont icon-bookmark-fill"></i>
                导航
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/links/">
                <i class="iconfont icon-link-fill"></i>
                友链
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/about/">
                <i class="iconfont icon-user-fill"></i>
                关于
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" data-toggle="modal" data-target="#modalSearch">&nbsp;&nbsp;<i
                class="iconfont icon-search"></i>&nbsp;&nbsp;</a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

    <div class="view intro-2" id="background" parallax=true
         style="background: url('https://img2.jimu98.cn/blog/20200729222155.jpg') no-repeat center center;
           background-size: cover;">
      <div class="full-bg-img">
        <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
          <div class="container text-center white-text fadeInUp">
            <span class="h2" id="subtitle">
              
            </span>

            
          </div>

          
            <div class="scroll-down-bar">
              <i class="iconfont icon-arrowdown"></i>
            </div>
          
        </div>
      </div>
    </div>
  </header>

  <main>
    
      <div class="container nopadding-md">
        <div class="py-5" id="board"
          style=margin-top:0>
          
          <div class="container">
            <div class="row">
              <div class="col-12 col-md-10 m-auto">
                


  <div class="row mx-auto index-card">
    
    
      <div class="col-12 col-md-4 m-auto index-img">
        <a href="/2020/07/25/jianzhi-offer/56%20-%20I.%20%E6%95%B0%E7%BB%84%E4%B8%AD%E6%95%B0%E5%AD%97%E5%87%BA%E7%8E%B0%E7%9A%84%E6%AC%A1%E6%95%B0/" target="_self">
          <img src="/img/offer.jpg" srcset="/img/loading.gif" alt="【剑指Offer】I. 数组中数字出现的次数">
        </a>
      </div>
    
    <div class="col-12 col-md-8 mx-auto index-info">
      <a class="index-header" href="/2020/07/25/jianzhi-offer/56%20-%20I.%20%E6%95%B0%E7%BB%84%E4%B8%AD%E6%95%B0%E5%AD%97%E5%87%BA%E7%8E%B0%E7%9A%84%E6%AC%A1%E6%95%B0/">【剑指Offer】I. 数组中数字出现的次数</a>

      <a href="/2020/07/25/jianzhi-offer/56%20-%20I.%20%E6%95%B0%E7%BB%84%E4%B8%AD%E6%95%B0%E5%AD%97%E5%87%BA%E7%8E%B0%E7%9A%84%E6%AC%A1%E6%95%B0/" class="index-excerpt">
        
        
          
        
        <div>题目一个整型数组 nums 里除两个数字之外，其他数字都出现了两次。请写程序找出这两个只出现一次的数字。要求时间复杂度是O(n)，空间复杂度是O(1)。
示例 1：
输入：nums = [4,1,4,6]输出：[1,6] 或 [6,1]示例 2：
输入：nums = [1,2,10,4,1,4,3,3]输出：[2,10] 或 [10,2]
限制：
2 &lt;= nums.length &lt;=</div>
      </a>

      <div class="index-btm post-metas">
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-date"></i>&nbsp;2020-07-25
          </div>
        
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-category"></i>
            
              <a href="/categories/%E7%AE%97%E6%B3%95/">算法</a>
            
          </div>
        
        
          <div class="post-meta">
            <i class="iconfont icon-tags"></i>
            
              <a href="/tags/%E5%89%91%E6%8C%87Offer/">剑指Offer</a>
            
              <a href="/tags/%E7%AE%97%E6%B3%95/">算法</a>
            
              <a href="/tags/%E6%95%B0%E7%BB%84/">数组</a>
            
          </div>
        
      </div>
    </div>
  </div>

  <div class="row mx-auto index-card">
    
    
      <div class="col-12 col-md-4 m-auto index-img">
        <a href="/2020/07/25/jianzhi-offer/55%20-%20II.%20%E5%B9%B3%E8%A1%A1%E4%BA%8C%E5%8F%89%E6%A0%91/" target="_self">
          <img src="/img/offer.jpg" srcset="/img/loading.gif" alt="【剑指Offer】平衡二叉树">
        </a>
      </div>
    
    <div class="col-12 col-md-8 mx-auto index-info">
      <a class="index-header" href="/2020/07/25/jianzhi-offer/55%20-%20II.%20%E5%B9%B3%E8%A1%A1%E4%BA%8C%E5%8F%89%E6%A0%91/">【剑指Offer】平衡二叉树</a>

      <a href="/2020/07/25/jianzhi-offer/55%20-%20II.%20%E5%B9%B3%E8%A1%A1%E4%BA%8C%E5%8F%89%E6%A0%91/" class="index-excerpt">
        
        
          
        
        <div>题目输入一棵二叉树的根节点，判断该树是不是平衡二叉树。如果某二叉树中任意节点的左右子树的深度相差不超过1，那么它就是一棵平衡二叉树。
示例 1:
给定二叉树 [3,9,20,null,null,15,7]
  3
 / \
9  20
  /  \
 15   7返回 true 。
示例 2:
给定二叉树 [1,2,2,3,3,null,null,4,4]
      1
     / \
   </div>
      </a>

      <div class="index-btm post-metas">
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-date"></i>&nbsp;2020-07-25
          </div>
        
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-category"></i>
            
              <a href="/categories/%E7%AE%97%E6%B3%95/">算法</a>
            
          </div>
        
        
          <div class="post-meta">
            <i class="iconfont icon-tags"></i>
            
              <a href="/tags/%E5%89%91%E6%8C%87Offer/">剑指Offer</a>
            
              <a href="/tags/%E7%AE%97%E6%B3%95/">算法</a>
            
              <a href="/tags/%E4%BA%8C%E5%8F%89%E6%A0%91/">二叉树</a>
            
          </div>
        
      </div>
    </div>
  </div>

  <div class="row mx-auto index-card">
    
    
      <div class="col-12 col-md-4 m-auto index-img">
        <a href="/2020/07/25/jianzhi-offer/55%20-%20I.%20%E4%BA%8C%E5%8F%89%E6%A0%91%E7%9A%84%E6%B7%B1%E5%BA%A6/" target="_self">
          <img src="/img/offer.jpg" srcset="/img/loading.gif" alt="【剑指Offer】55 - I. 二叉树的深度">
        </a>
      </div>
    
    <div class="col-12 col-md-8 mx-auto index-info">
      <a class="index-header" href="/2020/07/25/jianzhi-offer/55%20-%20I.%20%E4%BA%8C%E5%8F%89%E6%A0%91%E7%9A%84%E6%B7%B1%E5%BA%A6/">【剑指Offer】55 - I. 二叉树的深度</a>

      <a href="/2020/07/25/jianzhi-offer/55%20-%20I.%20%E4%BA%8C%E5%8F%89%E6%A0%91%E7%9A%84%E6%B7%B1%E5%BA%A6/" class="index-excerpt">
        
        
          
        
        <div>题目输入一棵二叉树的根节点，求该树的深度。从根节点到叶节点依次经过的节点（含根、叶节点）形成树的一条路径，最长路径的长度为树的深度。
例如：
给定二叉树 [3,9,20,null,null,15,7]，
  3
 / \
9  20
  /  \
 15   7返回它的最大深度 3 。
提示：
节点总数 &lt;= 10000
class Solution &#123;
    public in</div>
      </a>

      <div class="index-btm post-metas">
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-date"></i>&nbsp;2020-07-25
          </div>
        
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-category"></i>
            
              <a href="/categories/%E7%AE%97%E6%B3%95/">算法</a>
            
          </div>
        
        
          <div class="post-meta">
            <i class="iconfont icon-tags"></i>
            
              <a href="/tags/%E5%89%91%E6%8C%87Offer/">剑指Offer</a>
            
              <a href="/tags/%E7%AE%97%E6%B3%95/">算法</a>
            
              <a href="/tags/%E4%BA%8C%E5%8F%89%E6%A0%91/">二叉树</a>
            
          </div>
        
      </div>
    </div>
  </div>

  <div class="row mx-auto index-card">
    
    
      <div class="col-12 col-md-4 m-auto index-img">
        <a href="/2020/07/25/jianzhi-offer/54.%20%E4%BA%8C%E5%8F%89%E6%90%9C%E7%B4%A2%E6%A0%91%E7%9A%84%E7%AC%ACk%E5%A4%A7%E8%8A%82%E7%82%B9/" target="_self">
          <img src="/img/offer.jpg" srcset="/img/loading.gif" alt="【剑指Offer】二叉搜索树的第k大节点">
        </a>
      </div>
    
    <div class="col-12 col-md-8 mx-auto index-info">
      <a class="index-header" href="/2020/07/25/jianzhi-offer/54.%20%E4%BA%8C%E5%8F%89%E6%90%9C%E7%B4%A2%E6%A0%91%E7%9A%84%E7%AC%ACk%E5%A4%A7%E8%8A%82%E7%82%B9/">【剑指Offer】二叉搜索树的第k大节点</a>

      <a href="/2020/07/25/jianzhi-offer/54.%20%E4%BA%8C%E5%8F%89%E6%90%9C%E7%B4%A2%E6%A0%91%E7%9A%84%E7%AC%ACk%E5%A4%A7%E8%8A%82%E7%82%B9/" class="index-excerpt">
        
        
          
        
        <div>题目给定一棵二叉搜索树，请找出其中第k大的节点。
示例 1:
输入: root = [3,1,4,null,2], k = 1   3  /  1   4     2输出: 4示例 2:
输入: root = [5,3,6,2,4,null,null,1], k = 3       5      /      3   6    /    2   4  / 1输出: 4
限制：
1 ≤ k ≤ 二叉</div>
      </a>

      <div class="index-btm post-metas">
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-date"></i>&nbsp;2020-07-25
          </div>
        
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-category"></i>
            
              <a href="/categories/%E7%AE%97%E6%B3%95/">算法</a>
            
          </div>
        
        
          <div class="post-meta">
            <i class="iconfont icon-tags"></i>
            
              <a href="/tags/%E5%89%91%E6%8C%87Offer/">剑指Offer</a>
            
              <a href="/tags/%E7%AE%97%E6%B3%95/">算法</a>
            
              <a href="/tags/%E4%BA%8C%E5%8F%89%E6%90%9C%E7%B4%A2%E6%A0%91/">二叉搜索树</a>
            
          </div>
        
      </div>
    </div>
  </div>

  <div class="row mx-auto index-card">
    
    
      <div class="col-12 col-md-4 m-auto index-img">
        <a href="/2020/07/25/jianzhi-offer/53%20-%20II.%200%EF%BD%9En-1%E4%B8%AD%E7%BC%BA%E5%A4%B1%E7%9A%84%E6%95%B0%E5%AD%97/" target="_self">
          <img src="/img/offer.jpg" srcset="/img/loading.gif" alt="【剑指Offer】II. 0～n-1中缺失的数字">
        </a>
      </div>
    
    <div class="col-12 col-md-8 mx-auto index-info">
      <a class="index-header" href="/2020/07/25/jianzhi-offer/53%20-%20II.%200%EF%BD%9En-1%E4%B8%AD%E7%BC%BA%E5%A4%B1%E7%9A%84%E6%95%B0%E5%AD%97/">【剑指Offer】II. 0～n-1中缺失的数字</a>

      <a href="/2020/07/25/jianzhi-offer/53%20-%20II.%200%EF%BD%9En-1%E4%B8%AD%E7%BC%BA%E5%A4%B1%E7%9A%84%E6%95%B0%E5%AD%97/" class="index-excerpt">
        
        
          
        
        <div>题目一个长度为n-1的递增排序数组中的所有数字都是唯一的，并且每个数字都在范围0～n-1之内。在范围0～n-1内的n个数字中有且只有一个数字不在该数组中，请找出这个数字。
示例 1:
输入: [0,1,3]输出: 2示例 2:
输入: [0,1,2,3,4,5,6,7,9]输出: 8
限制：
1 &lt;= 数组长度 &lt;= 10000
题解class Solution &#123;
    </div>
      </a>

      <div class="index-btm post-metas">
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-date"></i>&nbsp;2020-07-25
          </div>
        
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-category"></i>
            
              <a href="/categories/%E7%AE%97%E6%B3%95/">算法</a>
            
          </div>
        
        
          <div class="post-meta">
            <i class="iconfont icon-tags"></i>
            
              <a href="/tags/%E5%89%91%E6%8C%87Offer/">剑指Offer</a>
            
              <a href="/tags/%E7%AE%97%E6%B3%95/">算法</a>
            
          </div>
        
      </div>
    </div>
  </div>

  <div class="row mx-auto index-card">
    
    
      <div class="col-12 col-md-4 m-auto index-img">
        <a href="/2020/07/25/jianzhi-offer/53%20-%20I.%20%E5%9C%A8%E6%8E%92%E5%BA%8F%E6%95%B0%E7%BB%84%E4%B8%AD%E6%9F%A5%E6%89%BE%E6%95%B0%E5%AD%97%20I/" target="_self">
          <img src="/img/offer.jpg" srcset="/img/loading.gif" alt="【剑指Offer】二叉搜索树的第k大节点">
        </a>
      </div>
    
    <div class="col-12 col-md-8 mx-auto index-info">
      <a class="index-header" href="/2020/07/25/jianzhi-offer/53%20-%20I.%20%E5%9C%A8%E6%8E%92%E5%BA%8F%E6%95%B0%E7%BB%84%E4%B8%AD%E6%9F%A5%E6%89%BE%E6%95%B0%E5%AD%97%20I/">【剑指Offer】二叉搜索树的第k大节点</a>

      <a href="/2020/07/25/jianzhi-offer/53%20-%20I.%20%E5%9C%A8%E6%8E%92%E5%BA%8F%E6%95%B0%E7%BB%84%E4%B8%AD%E6%9F%A5%E6%89%BE%E6%95%B0%E5%AD%97%20I/" class="index-excerpt">
        
        
          
        
        <div>题目统计一个数字在排序数组中出现的次数。
示例 1:
输入: nums = [5,7,7,8,8,10], target = 8输出: 2示例 2:
输入: nums = [5,7,7,8,8,10], target = 6输出: 0
限制：
0 &lt;= 数组长度 &lt;= 50000
题解class Solution &#123;
    public int search(int[] n</div>
      </a>

      <div class="index-btm post-metas">
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-date"></i>&nbsp;2020-07-25
          </div>
        
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-category"></i>
            
              <a href="/categories/%E7%AE%97%E6%B3%95/">算法</a>
            
          </div>
        
        
          <div class="post-meta">
            <i class="iconfont icon-tags"></i>
            
              <a href="/tags/%E5%89%91%E6%8C%87Offer/">剑指Offer</a>
            
              <a href="/tags/%E7%AE%97%E6%B3%95/">算法</a>
            
          </div>
        
      </div>
    </div>
  </div>

  <div class="row mx-auto index-card">
    
    
      <div class="col-12 col-md-4 m-auto index-img">
        <a href="/2020/07/25/jianzhi-offer/52.%20%E4%B8%A4%E4%B8%AA%E9%93%BE%E8%A1%A8%E7%9A%84%E7%AC%AC%E4%B8%80%E4%B8%AA%E5%85%AC%E5%85%B1%E8%8A%82%E7%82%B9/" target="_self">
          <img src="/img/offer.jpg" srcset="/img/loading.gif" alt="【剑指Offer】两个链表的第一个公共节点">
        </a>
      </div>
    
    <div class="col-12 col-md-8 mx-auto index-info">
      <a class="index-header" href="/2020/07/25/jianzhi-offer/52.%20%E4%B8%A4%E4%B8%AA%E9%93%BE%E8%A1%A8%E7%9A%84%E7%AC%AC%E4%B8%80%E4%B8%AA%E5%85%AC%E5%85%B1%E8%8A%82%E7%82%B9/">【剑指Offer】两个链表的第一个公共节点</a>

      <a href="/2020/07/25/jianzhi-offer/52.%20%E4%B8%A4%E4%B8%AA%E9%93%BE%E8%A1%A8%E7%9A%84%E7%AC%AC%E4%B8%80%E4%B8%AA%E5%85%AC%E5%85%B1%E8%8A%82%E7%82%B9/" class="index-excerpt">
        
        
          
        
        <div>题目输入两个链表，找出它们的第一个公共节点。
如下面的两个链表：

在节点 c1 开始相交。
示例 1：
 
输入：intersectVal = 8, listA = [4,1,8,4,5], listB = [5,0,1,8,4,5], skipA = 2, skipB = 3输出：Reference of the node with value = 8输入解释：相交节点的值为 8 （注意，如果</div>
      </a>

      <div class="index-btm post-metas">
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-date"></i>&nbsp;2020-07-25
          </div>
        
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-category"></i>
            
              <a href="/categories/%E7%AE%97%E6%B3%95/">算法</a>
            
          </div>
        
        
          <div class="post-meta">
            <i class="iconfont icon-tags"></i>
            
              <a href="/tags/%E5%89%91%E6%8C%87Offer/">剑指Offer</a>
            
              <a href="/tags/%E7%AE%97%E6%B3%95/">算法</a>
            
          </div>
        
      </div>
    </div>
  </div>

  <div class="row mx-auto index-card">
    
    
      <div class="col-12 col-md-4 m-auto index-img">
        <a href="/2020/07/24/xiangmu/%E8%B7%A8%E5%9F%9F%E9%97%AE%E9%A2%98/" target="_self">
          <img src="https://api2.mubu.com/v3/document_image/092e234b-1a2d-4472-84f2-e8db4d3b642f-1015484.jpg" srcset="/img/loading.gif" alt="跨域问题">
        </a>
      </div>
    
    <div class="col-12 col-md-8 mx-auto index-info">
      <a class="index-header" href="/2020/07/24/xiangmu/%E8%B7%A8%E5%9F%9F%E9%97%AE%E9%A2%98/">跨域问题</a>

      <a href="/2020/07/24/xiangmu/%E8%B7%A8%E5%9F%9F%E9%97%AE%E9%A2%98/" class="index-excerpt">
        
        
          
        
        <div>【项目笔记】跨域问题什么是跨域跨域：指的是浏览器不能执行其他网站的脚本。它是由浏览器的同源策略造成的，是 浏览器对javascript施加的安全限制。 • 同源策略：是指协议，域名，端口都要相同，其中有一个不同都会产生跨域；

跨域流程CORSCORS是一个W3C标准，全称是”跨域资源共享”（Cross-origin resource sharing）具体点这里
看名字就知道这是处理跨域问题的标准</div>
      </a>

      <div class="index-btm post-metas">
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-date"></i>&nbsp;2020-07-24
          </div>
        
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-category"></i>
            
              <a href="/categories/%E9%A1%B9%E7%9B%AE%E7%AC%94%E8%AE%B0/">项目笔记</a>
            
          </div>
        
        
          <div class="post-meta">
            <i class="iconfont icon-tags"></i>
            
              <a href="/tags/%E9%80%92%E5%BD%92/">递归</a>
            
              <a href="/tags/%E7%AE%AD%E5%A4%B4%E5%87%BD%E6%95%B0/">箭头函数</a>
            
              <a href="/tags/stream/">stream</a>
            
          </div>
        
      </div>
    </div>
  </div>

  <div class="row mx-auto index-card">
    
    
      <div class="col-12 col-md-4 m-auto index-img">
        <a href="/2020/07/23/xiangmu/%E4%B8%89%E7%BA%A7%E5%88%86%E7%B1%BB%EF%BC%9A%E9%80%92%E5%BD%92%E6%A0%91%E5%BD%A2%E7%BB%93%E6%9E%84%E6%95%B0%E6%8D%AE/" target="_self">
          <img src="https://api2.mubu.com/v3/document_image/59719865-d6cd-4fda-a1f0-04ce0e44383c-1015484.jpg" srcset="/img/loading.gif" alt="三级分类：递归树形结构数据">
        </a>
      </div>
    
    <div class="col-12 col-md-8 mx-auto index-info">
      <a class="index-header" href="/2020/07/23/xiangmu/%E4%B8%89%E7%BA%A7%E5%88%86%E7%B1%BB%EF%BC%9A%E9%80%92%E5%BD%92%E6%A0%91%E5%BD%A2%E7%BB%93%E6%9E%84%E6%95%B0%E6%8D%AE/">三级分类：递归树形结构数据</a>

      <a href="/2020/07/23/xiangmu/%E4%B8%89%E7%BA%A7%E5%88%86%E7%B1%BB%EF%BC%9A%E9%80%92%E5%BD%92%E6%A0%91%E5%BD%A2%E7%BB%93%E6%9E%84%E6%95%B0%E6%8D%AE/" class="index-excerpt">
        
        
          
        
        <div>【项目笔记】三级分类：递归树形结构数据
注意要熟悉 stream 写法

@Override
public List&lt;CategoryEntity&gt; listWithTree() &#123;
    //1.查出所有分类
    List&lt;CategoryEntity&gt; entities = baseMapper.selectList(null);

    List&l</div>
      </a>

      <div class="index-btm post-metas">
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-date"></i>&nbsp;2020-07-23
          </div>
        
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-category"></i>
            
              <a href="/categories/%E9%A1%B9%E7%9B%AE%E7%AC%94%E8%AE%B0/">项目笔记</a>
            
          </div>
        
        
          <div class="post-meta">
            <i class="iconfont icon-tags"></i>
            
              <a href="/tags/%E9%80%92%E5%BD%92/">递归</a>
            
              <a href="/tags/%E7%AE%AD%E5%A4%B4%E5%87%BD%E6%95%B0/">箭头函数</a>
            
              <a href="/tags/stream/">stream</a>
            
          </div>
        
      </div>
    </div>
  </div>

  <div class="row mx-auto index-card">
    
    
      <div class="col-12 col-md-4 m-auto index-img">
        <a href="/2020/07/23/xiangmu/Vue%E5%A4%8D%E4%B9%A0/" target="_self">
          <img src="https://api2.mubu.com/v3/document_image/aed10b9d-2bb1-4c33-a859-ffb34d0c27a3-1015484.jpg" srcset="/img/loading.gif" alt="【项目笔记】VUE复习">
        </a>
      </div>
    
    <div class="col-12 col-md-8 mx-auto index-info">
      <a class="index-header" href="/2020/07/23/xiangmu/Vue%E5%A4%8D%E4%B9%A0/">【项目笔记】VUE复习</a>

      <a href="/2020/07/23/xiangmu/Vue%E5%A4%8D%E4%B9%A0/" class="index-excerpt">
        
        
          
        
        <div>【项目笔记】VUE复习MVVM思想MVVM的全名是Model-View-ViewModel，它的基本思路就是这样：

M：即Model，模型，包括数据和一些基本操作
V：即View，试图，页面渲染结果
VM：即View-Model，模型与视图间的双向操作

Vue简介官网链接
入门案例&lt;div id&#x3D;&quot;app&quot;&gt;
    &lt;input type&#x</div>
      </a>

      <div class="index-btm post-metas">
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-date"></i>&nbsp;2020-07-23
          </div>
        
        
          <div class="post-meta mr-3">
            <i class="iconfont icon-category"></i>
            
              <a href="/categories/%E9%A1%B9%E7%9B%AE%E7%AC%94%E8%AE%B0/">项目笔记</a>
            
          </div>
        
        
          <div class="post-meta">
            <i class="iconfont icon-tags"></i>
            
              <a href="/tags/%E7%AE%AD%E5%A4%B4%E5%87%BD%E6%95%B0/">箭头函数</a>
            
              <a href="/tags/promist/">promist</a>
            
              <a href="/tags/VUE/">VUE</a>
            
          </div>
        
      </div>
    </div>
  </div>



  <nav aria-label="navigation">
    <span class="pagination" id="pagination">
      <a class="extend prev" rel="prev" href="/page/2/"><i class="iconfont icon-arrowleft"></i></a><a class="page-number" href="/">1</a><a class="page-number" href="/page/2/">2</a><span class="page-number current">3</span><a class="page-number" href="/page/4/">4</a><a class="page-number" href="/page/5/">5</a><span class="space">&hellip;</span><a class="page-number" href="/page/10/">10</a><a class="extend next" rel="next" href="/page/4/"><i class="iconfont icon-arrowright"></i></a>
    </span>
  </nav>
  
  <script>
    for (ele of document.getElementById("pagination").getElementsByTagName("a")) {
      ele.href += '#board';
    }
  </script>



              </div>
            </div>
          </div>
        </div>
      </div>
    
  </main>

  
    <a id="scroll-top-button" href="#" role="button">
      <i class="iconfont icon-arrowup" aria-hidden="true"></i>
    </a>
  

  
    <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">搜索</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v"
                 for="local-search-input">关键词</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>
  

  

  

  <footer class="mt-5">
  <div class="text-center py-3">
  <p id="hitokoto">:D 获取中...</p>
<script>
  fetch('https://v1.hitokoto.cn')
    .then(response => response.json())
    .then(data => {
      const hitokoto = document.getElementById('hitokoto')
      hitokoto.innerText = data.hitokoto
      })
      .catch(console.error)
</script>
   <div>
  <span id="timeDate">载入天数...</span>
  <span id="times">载入时分秒...</span>
  <script>
  var now = new Date();
  function createtime(){
      var grt= new Date("07/18/2020 18:00:00");//此处修改你的建站时间或者网站上线时间
      now.setTime(now.getTime()+250);
      days = (now - grt ) / 1000 / 60 / 60 / 24;
      dnum = Math.floor(days);
      hours = (now - grt ) / 1000 / 60 / 60 - (24 * dnum);
      hnum = Math.floor(hours);
      if(String(hnum).length ==1 ){
          hnum = "0" + hnum;
      }
      minutes = (now - grt ) / 1000 /60 - (24 * 60 * dnum) - (60 * hnum);
      mnum = Math.floor(minutes);
      if(String(mnum).length ==1 ){
                mnum = "0" + mnum;
      }
      seconds = (now - grt ) / 1000 - (24 * 60 * 60 * dnum) - (60 * 60 * hnum) - (60 * mnum);
      snum = Math.round(seconds);
      if(String(snum).length ==1 ){
                snum = "0" + snum;
      }
      document.getElementById("timeDate").innerHTML = "本站安全运行&nbsp"+dnum+"&nbsp天";
      document.getElementById("times").innerHTML = hnum + "&nbsp小时&nbsp" + mnum + "&nbsp分&nbsp" + snum + "&nbsp秒";
  }
  setInterval("createtime()",250);
  </script>
</div>
    <div>
      &copy;2019 - 2020 By Jimu98
    </div>
    

    
  <!-- 备案信息 -->
  <div class="beian">
		
          <img src="/img/police_beian.png" srcset="/img/loading.gif" alt="police-icon" />
        
    <a href="http://beian.miit.gov.cn/" target="_blank"
       rel="nofollow noopener">冀ICP备19035627号</a>
    
  </div>


    
      <!-- cnzz Analytics Icon -->
      <span id="cnzz_stat_icon_1278280985" style="display: none"></span>
    
  </div>

</footer>

<!-- SCRIPTS -->
<script  src="https://cdn.staticfile.org/jquery/3.4.1/jquery.min.js" ></script>
<script  src="https://cdn.staticfile.org/twitter-bootstrap/4.4.1/js/bootstrap.min.js" ></script>
<script  src="/js/debouncer.js" ></script>
<script  src="/js/main.js" ></script>

<!-- Plugins -->


  
    <script  src="/js/lazyload.js" ></script>
  



  <script defer src="https://cdn.staticfile.org/clipboard.js/2.0.6/clipboard.min.js" ></script>
  <script  src="/js/clipboard-use.js" ></script>









  <script  src="https://cdn.staticfile.org/typed.js/2.0.11/typed.min.js" ></script>
  <script>
    var typed = new Typed('#subtitle', {
      strings: [
        '  ',
        "你会的越多,你不会的越多!&nbsp;",
      ],
      cursorChar: "|",
      typeSpeed: 95,
      loop: false,
    });
    typed.stop();
    $(document).ready(function () {
      $(".typed-cursor").addClass("h2");
      typed.start();
    });
  </script>





  <script  src="/js/local-search.js" ></script>
  <script>
    var path = "/local-search.xml";
    var inputArea = document.querySelector("#local-search-input");
    inputArea.onclick = function () {
      searchFunc(path, 'local-search-input', 'local-search-result');
      this.onclick = null
    }
  </script>









  
  
    <script>
      !function (e, t, a) {
        function r() {
          for (var e = 0; e < s.length; e++) s[e].alpha <= 0 ? (t.body.removeChild(s[e].el), s.splice(e, 1)) : (s[e].y--, s[e].scale += .004, s[e].alpha -= .013, s[e].el.style.cssText = "left:" + s[e].x + "px;top:" + s[e].y + "px;opacity:" + s[e].alpha + ";transform:scale(" + s[e].scale + "," + s[e].scale + ") rotate(45deg);background:" + s[e].color + ";z-index:99999");
          requestAnimationFrame(r)
        }

        function n() {
          var t = "function" == typeof e.onclick && e.onclick;
          e.onclick = function (e) {
            t && t(), o(e)
          }
        }

        function o(e) {
          var a = t.createElement("div");
          a.className = "heart", s.push({
            el: a,
            x: e.clientX - 5,
            y: e.clientY - 5,
            scale: 1,
            alpha: 1,
            color: c()
          }), t.body.appendChild(a)
        }

        function i(e) {
          var a = t.createElement("style");
          a.type = "text/css";
          try {
            a.appendChild(t.createTextNode(e))
          } catch (t) {
            a.styleSheet.cssText = e
          }
          t.getElementsByTagName("head")[0].appendChild(a)
        }

        function c() {
          return "rgb(" + ~~(255 * Math.random()) + "," + ~~(255 * Math.random()) + "," + ~~(255 * Math.random()) + ")"
        }

        var s = [];
        e.requestAnimationFrame = e.requestAnimationFrame || e.webkitRequestAnimationFrame || e.mozRequestAnimationFrame || e.oRequestAnimationFrame || e.msRequestAnimationFrame || function (e) {
          setTimeout(e, 1e3 / 60)
        }, i(".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: fixed;}.heart:after{top: -5px;}.heart:before{left: -5px;}"), n(), r()
      }(window, document);
    </script>
  











  

  

  

  

  

  
    <!-- cnzz Analytics -->
    <script defer src="//s4.cnzz.com/z_stat.php?id=1278280985&show=pic"
            type="text/javascript"></script>
  





</body>
</html>
